package org.tiger.springboot.redis.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.tiger.common.domain.ResponseBean;
import org.tiger.springboot.redis.domain.RequestBean;
import org.tiger.springboot.redis.service.SecKillService;

@RestController
@RequestMapping("/secKill")
public class SecKillController {

    private final static Logger logger = LoggerFactory.getLogger(SecKillController.class);

    @Autowired
    private SecKillService secKillService;

    @RequestMapping("/secKillByCountDownLatch")
    public ResponseBean<Object> secKillByCountDownLatch(RequestBean requestBean){

        return secKillService.secKillByCountDownLatch(requestBean.getSecKillGoodsId());
    }

    @RequestMapping("/secKillByLock")
    public ResponseBean<Object> secKillByLock(){

        return null;

    }


}
